#ifndef TABLEHEADERVIEW_H
#define TABLEHEADERVIEW_H

#include <QHeaderView>
#include <QCheckBox>

class TableHeaderView : public QHeaderView
{
	Q_OBJECT

public:
	TableHeaderView(Qt::Orientation, QWidget *);
	~TableHeaderView();

	QCheckBox*		m_pCheckBox;

protected:
	void paintSection(QPainter *painter, const QRect &rect, int logicalIndex) const;
	void mousePressEvent(QMouseEvent *e);
	void mouseReleaseEvent(QMouseEvent *e);
	void mouseMoveEvent(QMouseEvent *e);
	//bool event(QEvent *e);

private:
	bool	m_bPressed;
	bool	m_bChecked;
	bool	m_bTristate;
	bool	m_bNoChange;
	bool	m_bMoving;
	

protected slots:
	void	onStateChanged(int state);
signals:
	void	stateChanged(int);
	void	test();
};

#endif // TABLEHEADERVIEW_H
